package com.drm.netschool.mapper;

import com.drm.netschool.entity.DrmCourseStatus;
import com.drm.netschool.entity.DrmCourseStatusExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface DrmCourseStatusMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    int countByExample(DrmCourseStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    int deleteByExample(DrmCourseStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    @Delete({
        "delete from drm_course_status",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    @Insert({
        "insert into drm_course_status (id, course_id, ",
        "course_boutique, course_checkyn, ",
        "course_publishyn, course_goodteacher, ",
        "course_lookset_islogin, course_lookset_islogin_time, ",
        "course_lookset_nologin, course_lookset_nologin_time)",
        "values (#{id,jdbcType=BIGINT}, #{courseId,jdbcType=BIGINT}, ",
        "#{courseBoutique,jdbcType=INTEGER}, #{courseCheckyn,jdbcType=INTEGER}, ",
        "#{coursePublishyn,jdbcType=INTEGER}, #{courseGoodteacher,jdbcType=INTEGER}, ",
        "#{courseLooksetIslogin,jdbcType=INTEGER}, #{courseLooksetIsloginTime,jdbcType=INTEGER}, ",
        "#{courseLooksetNologin,jdbcType=INTEGER}, #{courseLooksetNologinTime,jdbcType=INTEGER})"
    })
    int insert(DrmCourseStatus record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    int insertSelective(DrmCourseStatus record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    List<DrmCourseStatus> selectByExample(DrmCourseStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    @Select({
        "select",
        "id, course_id, course_boutique, course_checkyn, course_publishyn, course_goodteacher, ",
        "course_lookset_islogin, course_lookset_islogin_time, course_lookset_nologin, ",
        "course_lookset_nologin_time",
        "from drm_course_status",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @ResultMap("BaseResultMap")
    DrmCourseStatus selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    int updateByExampleSelective(@Param("record") DrmCourseStatus record, @Param("example") DrmCourseStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    int updateByExample(@Param("record") DrmCourseStatus record, @Param("example") DrmCourseStatusExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    int updateByPrimaryKeySelective(DrmCourseStatus record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table drm_course_status
     *
     * @mbggenerated Thu Aug 13 00:51:57 CST 2015
     */
    @Update({
        "update drm_course_status",
        "set course_id = #{courseId,jdbcType=BIGINT},",
          "course_boutique = #{courseBoutique,jdbcType=INTEGER},",
          "course_checkyn = #{courseCheckyn,jdbcType=INTEGER},",
          "course_publishyn = #{coursePublishyn,jdbcType=INTEGER},",
          "course_goodteacher = #{courseGoodteacher,jdbcType=INTEGER},",
          "course_lookset_islogin = #{courseLooksetIslogin,jdbcType=INTEGER},",
          "course_lookset_islogin_time = #{courseLooksetIsloginTime,jdbcType=INTEGER},",
          "course_lookset_nologin = #{courseLooksetNologin,jdbcType=INTEGER},",
          "course_lookset_nologin_time = #{courseLooksetNologinTime,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(DrmCourseStatus record);
}